var newsTable;
//
function queryAllcountLive(lid) {
	if (typeof newsTable !== 'undefined') {
		newsTable.fnPageChange('first');
		return;
	}

	var i = 1;
	newsTable = $("#newsList").DataTable({
		"sAjaxSource" : _path + "/live/liveCountQueryByPage",
		"fnServerParams" : function(aoData) {
			aoData.push({
				"name" : "id",
				"value" : lid
			});
		},
		"sServerMethod" : "POST",
		"sAjaxDataProp" : "dataList",
		"fnCreatedRow" : function() {
			i++;
		},
		"fnPreDrawCallback" : function() {
			i = 1;
		},
		"aoColumns" : [ {
			"sTitle" : "序号",
			"sWidth" : "2%",
			"mData" : function() {
				return i;
			}
		}, {
			"sTitle" : "直播开始时间",
			"mData" : "fromDate",
			"sWidth" : "10%"
		}, {
			"sTitle" : "直播结束时间",
			"mData" : "toDate",
			"sWidth" : "10%"
		}, {
			"sTitle" : "直播时长(分钟)",
			"sWidth" : "10%",
			"mData" : function(data) {
				return Math.round(data.zdata);
			}
		}, {
			"sTitle" : "直播页面访问次数",
			"sWidth" : "10%",
			"mData" : "fwcs"
		}, {
			"sTitle" : "直播页面访问人数",
			"sWidth" : "10%",
			"mData" : "fwrs"
		}, {
			"sTitle" : "直播观看次数",
			"sWidth" : "10%",
			"mData" : "gkcs"
		}, {
			"sTitle" : "直播观看人数",
			"sWidth" : "10%",
			"mData" : "gkrs"
		}, {
			"sTitle" : "评论条数",
			"sWidth" : "10%",
			"mData" : "plcs"
		}, {
			"sTitle" : "评论人数",
			"sWidth" : "10%",
			"mData" : "plrs"
		} ]
	});
}
